<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>

<head>

<title>用户管理</title>

<link
	href="${pageContext.request.contextPath }/css/bootstrap.min.css?v=3.3.6"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath }/css/font-awesome.css?v=4.4.0"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath }/css/plugins/iCheck/custom.css"
	rel="stylesheet">
	
<!-- Sweet Alert -->
<link href="${pageContext.request.contextPath }/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">

<!-- chosen -->
<link
	href="${pageContext.request.contextPath }/css/plugins/chosen/bootstrap-chosen.css"
	rel="stylesheet">

<link href="${pageContext.request.contextPath }/css/animate.css"
	rel="stylesheet">
<link href="${pageContext.request.contextPath }/css/style.css?v=4.1.0"
	rel="stylesheet">


<link
	href="${pageContext.request.contextPath }/css/plugins/bootstrap-table/bootstrap-table.min.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath }/css/plugins/toastr/toastr.min.css"
	rel="stylesheet">
</head>

<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">

		<div class="row">
			<!-- 用户管理 -->
			<div class="col-sm-12">
				<div class="ibox">
					<div class="ibox-content">
						<div class="tab-content">
							<div id="userToolbar">
								<span class="small text-center">
									<button class="btn btn-xs btn-primary" onclick="addUser()">
										<i class="fa fa-user-plus"></i> 新增员工
									</button>
								</span> <span class="small text-center">
									<button class="btn btn-xs btn-info" onclick="removeForbidden()">
										<i class="fa fa-external-link-square"></i> 解除禁用
									</button>
								</span><span class="small text-center">
									<button class="btn btn-xs btn-danger" onclick="batchDelete()">
										<i class="fa fa-user-times"></i> 批量禁用
									</button>
								</span>
							</div>
							<h2>员工管理</h2>
							<div class="alert alert-info alert-dismissable">
								<button aria-hidden="true" data-dismiss="alert" class="close"
									type="button">×</button>
								双击行可以查看员工详细信息、角色授权可多选
							</div>
							<div class="">
								<div class="tab-pane active">
									<div class="table-responsive"></div>
									<!-- 动态生成表格 -->
									<table id="userTable">
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>



	</div>



	<!-- 新增用户的弹出框 -->
	<div class="modal inmodal" id="addUserModal" tabindex="-1"
		role="dialog" aria-hidden="true">
		<div class="modal-dialog modal-lg">
			<div class="modal-content animated fadeIn">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
					</button>
					<h4 class="modal-title">新增员工</h4>
				</div>
				<div class="row">
					<div class="col-sm-12">
						<div class="ibox float-e-margins">
							<div class="ibox-content">
								<form class="form-horizontal" id="addUserForm"
									enctype="application/x-www-form-urlencoded" method="post">
									<div class="form-group">
										<div class="col-sm-6">
											<label class="col-sm-4 text-center control-label">员工id</label>
											<div class="col-sm-8">
												<input class="form-control" name="userId"
													placeholder="请输入EHR编号，确定后不能修改">
											</div>
										</div>
										<div class="col-sm-6">
											<label class="col-sm-4 text-center control-label">登录账号</label>
											<div class="col-sm-8">
												<input class="form-control" name="loginName">
											</div>
										</div>
									</div>

									<div class="form-group">
										<div class="col-sm-6">
											<label class="col-sm-4 text-center control-label">员工姓名</label>
											<div class="col-sm-8">
												<input class="form-control" name="userName">
											</div>
										</div>
										<div class="col-sm-6">
											<label class="col-sm-4 text-center control-label">性别</label>
											<div class="col-sm-8">
												<div class="radio i-checks">
													<label> <input type="radio" checked=""  value="1"
														name="userSex"> <i></i> 男</label> 
													<label> <input type="radio" value="0"
														name="userSex"> <i></i> 女 </label>
												</div>
											</div>
										</div>
									</div>

									<div class="form-group">
										<div class="col-sm-6">
											<label class="col-sm-4 text-center control-label">手机号码</label>
											<div class="col-sm-8">
												<input class="form-control" name="userMobile" >
											</div>
										</div>
										<div class="col-sm-6">
											<label class="col-sm-4 text-center control-label">联系地址</label>
											<div class="col-sm-8">
												<input class="form-control" name="userAddress" >
											</div>
										</div>
									</div>

									<div class="form-group">
										<div class="col-sm-6">
											<label class="col-sm-4 text-center control-label">电子邮箱</label>
											<div class="col-sm-8">
												<input class="form-control" name="userEmail" >
											</div>
										</div>
										<div class="col-sm-6">
											<label class="col-sm-4 control-label">选择角色：</label>
											<div class="col-sm-8">
												<select data-placeholder="下拉选择角色"
													id="chosen-select" multiple name="roleIds">
												</select>
											</div>
										</div>
									</div>


									<div class="form-group">
										<div class="col-sm-12">
											<label class="col-sm-2 text-center control-label">个人简介</label>
											<div class="col-sm-10">
												<textarea class="form-control" rows="3" name="userDesc" ></textarea>
											</div>
										</div>
									</div>
								</form>

							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary"
						onclick="addUserSave()">保存</button>
				</div>
			</div>
		</div>
	</div>
	
	
	<!-- 用户详情弹出框开始 -->
    <div class="modal inmodal fade" id="userDetailModal" tabindex="-1"
				role="dialog" aria-hidden="true">
		<div class="modal-dialog "><!-- modal-lg -->
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
					</button>
					<h4 class="modal-title">用户详情</h4>
				</div>
				<div class="modal-body">
					<div class="row">
						<div class="col-sm-12">
							<div class="col-sm-1"></div>
							<div class="col-sm-10" id="userDetailShow">
							
							</div>
							
						</div>
					</div>
				</div>

				<div class="modal-footer">
					<button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 用户详情弹出框结束 -->

	<!-- 角色授权的弹出框开始 -->
	<div class="modal inmodal" id="roleLicenseModal" tabindex="-1"
		role="dialog" aria-hidden="true">
		<div class="modal-dialog modal-lg">
			<div class="modal-content animated fadeIn">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
					</button>
					<h4 class="modal-title">角色授权</h4>
				</div>

				<div class="row">
					<div class="col-sm-12">
						<div class="ibox float-e-margins">
							<div class="ibox-content">
								<form class="form-horizontal" id="roleLicenseForm"
									enctype="application/x-www-form-urlencoded" style="margin:20px auto 100px">
									<input type="hidden" name="userId" />
									<div class="form-group">
										<label class="col-sm-4 control-label">选择角色：</label>
										<div class="col-sm-6">
											<select data-placeholder="下拉选择角色"
												id="chosen-select" multiple name="roleIds">
												
											</select>
										</div>
									</div>
								</form>
							</div>
						</div>
					</div>
					
				</div>

				<div class="modal-footer">
					<button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary"
						onclick="roleLicenseSave()">保存</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 修改角色的弹出框结束 -->


	<!-- 全局js -->
	<script
		src="${pageContext.request.contextPath }/js/jquery.min.js?v=2.1.4"></script>
	<script
		src="${pageContext.request.contextPath }/js/bootstrap.min.js?v=3.3.6"></script>


	<!-- iCheck -->
	<script
		src="${pageContext.request.contextPath }/js/plugins/iCheck/icheck.min.js"></script>
	<script>
		$(document).ready(function() {
			$('.i-checks').iCheck({
				checkboxClass : 'icheckbox_square-green',
				radioClass : 'iradio_square-green',
			});
		});
	</script>

	<!-- bootstr表格插件 -->
	<script src="${pageContext.request.contextPath }/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
	<script src="${pageContext.request.contextPath }/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
	<script src="${pageContext.request.contextPath }/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>

	<!-- 表单验证插件   -->
	<script src="${pageContext.request.contextPath }/js/plugins/validate/jquery.validate.js"></script>
	<script src="${pageContext.request.contextPath }/js/plugins/validate/messages_zh.min.js"></script>
	

	<!-- 通知插件 -->
	<script src="${pageContext.request.contextPath }/js/plugins/sweetalert/sweetalert.min.js"></script>
	<script src="${pageContext.request.contextPath }/js/plugins/toastr/toastr.min.js"></script>
	
	<!-- 格式化时间 -->
	<script src="${pageContext.request.contextPath }/js/plugins/moment.js"></script>

	<!-- Chosen多选插件 -->
	<script src="${pageContext.request.contextPath }/js/plugins/chosen/chosen.jquery.js"></script>
		
	<!-- 自己的 -->
	<script src="${pageContext.request.contextPath }/myJs/common.js"></script>
	<script src="${pageContext.request.contextPath }/myJs/admin/user/user.js"></script>
</body>

</html>
